//
//  TableHeaderView.m
//  kuaiyi
//
//  Created by vn on 16/7/6.
//  Copyright © 2016年 Alphts. All rights reserved.
//

#import "TableHeaderView.h"

@interface TableHeaderView()


@property(nonatomic,strong)UIImageView * imageView;

@property(nonatomic,strong)UIImageView * textImageView;

@end


@implementation TableHeaderView
- (instancetype)initWithFrame:(CGRect)frame{
    
  
    if (self = [super initWithFrame:frame]) {
       
        [self setUpUI];
        
    }
    
     return self;
    
}

#pragma mark -- 布局子控件
- (void)layoutSubviews{
    
    [super layoutSubviews];
    
    [self.imageView mas_makeConstraints:^(MASConstraintMaker *make) {
       
        
        make.width.offset(67);
        make.height.offset(88);
        make.centerX.equalTo(self.centerX);
        make.top.offset(30);
        
    }];
    
    
    [self.textImageView mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.centerX.equalTo(self.centerX);
        make.top.offset(120);
        make.width.offset(80);
        make.height.offset(53);
        
    }];
  

}





#pragma mark -- 初始化子空间
- (void)setUpUI{
    //实例化imageView
    self.imageView= [[UIImageView alloc]init];
    self.imageView.image = [UIImage imageNamed:@"product_img_logo_nor.png"];
    [self addSubview:self.imageView];
    
    //实例化textImageView
    self.textImageView = [[UIImageView alloc]init];
    self.textImageView.image = [UIImage imageNamed:@"product_text_logo_nor.png"];
    [self addSubview:self.textImageView];
    
}


@end
